<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button id="btn">click</button>
    <script>
      const btn = document.getElementById("btn");
      btn.onclick = function (e) {
        console.log(e.type); //事件类型（名称）
        console.log(e.currentTarget, this); // 事件绑定对象
        console.log(e.clientX, e.clientY); // 鼠标窗口坐标
      };
    </script>
  </body>
</html>
